#include<iostream>

#include<stdio.h>

#include <pthread.h>

#include<unistd.h>

#include<string>

using namespace std;

void* my_thread_1(void* arg)
{
    int cnt = 5;
    while(cnt--)
    {
        printf("%p\n", pthread_self());
        printf("%x\n", pthread_self());
        sleep(1);
    }
    return nullptr;
}

int main()
{
    pthread_t PT;
    pthread_create(&PT, nullptr, my_thread_1, nullptr);

    int cnt = 5;
    while(cnt--)
    {
        printf("%p\n", (void*)PT);
        printf("%x\n", (void*)PT);
        sleep(1);
    }

    pthread_join(PT, nullptr);
    return 0;
}